﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Arcana.Contract.Tests.Argument.Any.That.Is
{
    [TestClass]
    public class NullAttributeTest
    {
        [Arcana.Contract.Argument.Any.That.Is.Null("x")]
        public static void Target_1(string[] x)
        {
        }

        [TestMethod]
        [Owner("arcane_master")]
        [WorkItem(48)]
        [ExpectedException(typeof(ArgumentException))]
        public void ShouldThrowException()
        {
            Target_1(new string[] { "s", "f", "3", "t" });
        }

        [TestMethod]
        [Owner("arcane_master")]
        [WorkItem(48)]
        public void ShouldPass()
        {
            Target_1(new string[] { "s", "f", null, "t" });
            Target_1(new string[] { });
        }
    }
}
